<script>
  import { getContext } from 'svelte';
  const ctx = getContext('iconCtx') ?? {};
  let className = ctx.class || '';
  export { className as class };
  export let size = ctx.size || '24';
  export let role = ctx.role || 'img';
  export let color = ctx.color || 'currentColor';
  export let withEvents = ctx.withEvents || false;
  export let ariaLabel = 'discord logo';
  export let title = {
    id: `discord-logo-title-${Math.random().toString(36).substring(7)}`,
    title: ariaLabel,
  };
  export let desc = {
    id: `discord-logo-desc-${Math.random().toString(36).substring(7)}`,
    desc: 'A discord logo',
  };
  let ariaDescribedby = `${title.id || ''} ${desc.id || ''}`;
  let hasDescription = false;
  $: if (title.id || desc.id) {
    hasDescription = true;
  } else {
    hasDescription = false;
  }
</script>

{#if withEvents}
  <svg
    xmlns="http://www.w3.org/2000/svg"
    {...$$restProps}
    {role}
    width={size}
    height={size}
    class={className}
    aria-label={ariaLabel}
    aria-describedby={hasDescription ? ariaDescribedby : undefined}
    viewBox="0 0 33 26"
    on:click
    on:keydown
    on:keyup
    on:focus
    on:blur
    on:mouseenter
    on:mouseleave
    on:mouseover
    on:mouseout>
    {#if title.id && title.title}
      <title id={title.id}>{title.title}</title>
    {/if}
    {#if desc.id && desc.desc}
      <desc id={desc.id}>{desc.desc}</desc>
    {/if}

    <path
      d="M27.6891 2.94332C25.6496 1.99412 23.4625 1.29479 21.1757 0.894258C21.1341 0.886528 21.0925 0.905846 21.071 0.944484C20.7898 1.45191 20.4782 2.11389 20.26 2.63421C17.8004 2.26073 15.3535 2.26073 12.9444 2.63421C12.7262 2.10233 12.4033 1.45191 12.1207 0.944484C12.0993 0.907135 12.0577 0.887817 12.016 0.894258C9.73054 1.29351 7.54343 1.99284 5.50262 2.94332C5.48496 2.95105 5.46981 2.96394 5.45976 2.98067C1.31128 9.26696 0.174835 15.3987 0.732336 21.4545C0.734859 21.4841 0.751256 21.5124 0.77396 21.5305C3.51101 23.5692 6.16231 24.8069 8.76438 25.6273C8.80602 25.6402 8.85015 25.6247 8.87665 25.5899C9.49217 24.7374 10.0408 23.8384 10.5113 22.893C10.5391 22.8377 10.5125 22.772 10.4558 22.7501C9.58551 22.4152 8.75681 22.007 7.95966 21.5433C7.8966 21.506 7.89155 21.4145 7.94956 21.3707C8.11731 21.2432 8.2851 21.1106 8.44528 20.9766C8.47426 20.9522 8.51465 20.947 8.54872 20.9625C13.7857 23.3876 19.4553 23.3876 24.6304 20.9625C24.6645 20.9457 24.7049 20.9509 24.7351 20.9754C24.8954 21.1093 25.0631 21.2432 25.2321 21.3707C25.2901 21.4145 25.2863 21.506 25.2233 21.5433C24.4261 22.016 23.5974 22.4152 22.7259 22.7488C22.6691 22.7707 22.6439 22.8377 22.6716 22.893C23.1522 23.8371 23.7009 24.736 24.305 25.5887C24.3303 25.6247 24.3757 25.6402 24.4173 25.6273C27.032 24.8069 29.6833 23.5692 32.4203 21.5305C32.4443 21.5124 32.4594 21.4854 32.462 21.4558C33.1292 14.4546 31.3444 8.37316 27.7307 2.98195C27.7219 2.96394 27.7068 2.95105 27.6891 2.94332ZM11.2933 17.7672C9.71666 17.7672 8.41752 16.299 8.41752 14.4959C8.41752 12.6928 9.69147 11.2246 11.2933 11.2246C12.9078 11.2246 14.1944 12.7057 14.1691 14.4959C14.1691 16.299 12.8952 17.7672 11.2933 17.7672ZM21.9262 17.7672C20.3496 17.7672 19.0504 16.299 19.0504 14.4959C19.0504 12.6928 20.3243 11.2246 21.9262 11.2246C23.5407 11.2246 24.8272 12.7057 24.802 14.4959C24.802 16.299 23.5407 17.7672 21.9262 17.7672Z"
      fill={color} />
  </svg>
{:else}
  <svg
    xmlns="http://www.w3.org/2000/svg"
    {...$$restProps}
    {role}
    width={size}
    height={size}
    class={className}
    aria-label={ariaLabel}
    aria-describedby={hasDescription ? ariaDescribedby : undefined}
    viewBox="0 0 33 26">
    {#if title.id && title.title}
      <title id={title.id}>{title.title}</title>
    {/if}
    {#if desc.id && desc.desc}
      <desc id={desc.id}>{desc.desc}</desc>
    {/if}

    <path
      d="M27.6891 2.94332C25.6496 1.99412 23.4625 1.29479 21.1757 0.894258C21.1341 0.886528 21.0925 0.905846 21.071 0.944484C20.7898 1.45191 20.4782 2.11389 20.26 2.63421C17.8004 2.26073 15.3535 2.26073 12.9444 2.63421C12.7262 2.10233 12.4033 1.45191 12.1207 0.944484C12.0993 0.907135 12.0577 0.887817 12.016 0.894258C9.73054 1.29351 7.54343 1.99284 5.50262 2.94332C5.48496 2.95105 5.46981 2.96394 5.45976 2.98067C1.31128 9.26696 0.174835 15.3987 0.732336 21.4545C0.734859 21.4841 0.751256 21.5124 0.77396 21.5305C3.51101 23.5692 6.16231 24.8069 8.76438 25.6273C8.80602 25.6402 8.85015 25.6247 8.87665 25.5899C9.49217 24.7374 10.0408 23.8384 10.5113 22.893C10.5391 22.8377 10.5125 22.772 10.4558 22.7501C9.58551 22.4152 8.75681 22.007 7.95966 21.5433C7.8966 21.506 7.89155 21.4145 7.94956 21.3707C8.11731 21.2432 8.2851 21.1106 8.44528 20.9766C8.47426 20.9522 8.51465 20.947 8.54872 20.9625C13.7857 23.3876 19.4553 23.3876 24.6304 20.9625C24.6645 20.9457 24.7049 20.9509 24.7351 20.9754C24.8954 21.1093 25.0631 21.2432 25.2321 21.3707C25.2901 21.4145 25.2863 21.506 25.2233 21.5433C24.4261 22.016 23.5974 22.4152 22.7259 22.7488C22.6691 22.7707 22.6439 22.8377 22.6716 22.893C23.1522 23.8371 23.7009 24.736 24.305 25.5887C24.3303 25.6247 24.3757 25.6402 24.4173 25.6273C27.032 24.8069 29.6833 23.5692 32.4203 21.5305C32.4443 21.5124 32.4594 21.4854 32.462 21.4558C33.1292 14.4546 31.3444 8.37316 27.7307 2.98195C27.7219 2.96394 27.7068 2.95105 27.6891 2.94332ZM11.2933 17.7672C9.71666 17.7672 8.41752 16.299 8.41752 14.4959C8.41752 12.6928 9.69147 11.2246 11.2933 11.2246C12.9078 11.2246 14.1944 12.7057 14.1691 14.4959C14.1691 16.299 12.8952 17.7672 11.2933 17.7672ZM21.9262 17.7672C20.3496 17.7672 19.0504 16.299 19.0504 14.4959C19.0504 12.6928 20.3243 11.2246 21.9262 11.2246C23.5407 11.2246 24.8272 12.7057 24.802 14.4959C24.802 16.299 23.5407 17.7672 21.9262 17.7672Z"
      fill={color} />
  </svg>
{/if}
